package com.leo.script;

import lombok.extern.slf4j.Slf4j;

import java.io.IOException;
import java.io.Writer;

@Slf4j
public class Slf4jErrorWriter extends Writer {

    @Override
    public void write(char[] cbuf, int off, int len) throws IOException {
        log.error(new String(cbuf, off, len));
    }

    @Override
    public void flush() throws IOException {
    }

    @Override
    public void close() throws IOException {
    }
}
